I believe you'd still be able to file jointly if you're on a working visa and your spouse is not working, even if they don't reside in the US. The only caveat is that their worldwide income would be subject to US taxation if they have income from abroad.
"In general, resident aliens are taxed just like U.S. citizens. You would list a resident-alien spouse on your return and provide his or her Social Security number (SSN). If your spouse is not eligible for a Social Security number, he or she will need to apply for an Individual Taxpayer Identification Number (ITIN) from the IRS.
If your spouse is a nonresident alien, you can treat your spouse as a resident alien for tax purposes. If you choose this option, you can file a joint tax return with your spouse and have an increased standard deduction. You increase your standard deduction, but all your spouse's worldwide income will be taxed by the United States."
https://turbotax.intuit.com/tax-tips/family/claiming-a-non-c...
"In general, resident aliens are taxed just like U.S. citizens. You would list a resident-alien spouse on your return and provide his or her Social Security number (SSN). If your spouse is not eligible for a Social Security number, he or she will need to apply for an Individual Taxpayer Identification Number (ITIN) from the IRS.
If your spouse is a nonresident alien, you can treat your spouse as a resident alien for tax purposes. If you choose this option, you can file a joint tax return with your spouse and have an increased standard deduction. You increase your standard deduction, but all your spouse's worldwide income will be taxed by the United States."
Reference on "Standard Deduction": https://en.wikipedia.org/wiki/Standard_deduction