No, it is not backwards ("forwards"?) compatible.
However, if you don't need any of the new features, then you target "Windows Phone OS 7.1" (this is supported with the WP 8 SDK) and run the resulting code on both WP7 and WP8.
If you need something more sophisticated, try searching for "Portable Class Library" if you want some examples of sharing code between WP7 and WP8 applications.