Can we file tax jointly if each of us are with different residency state?

I am a MD resident and my spouse is a TX resident (whole year). Can we file tax jointly?