Yes, you can file a joint return for New York and Alabama.
However, please note: for New York, if you file a joint return, both spouse are treated as New York residents, so you will want to prepare Alabama first, as you will be able to claim a credit for the taxes paid to Alabama.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"