If you were married on the last day of the year, then you cannot file as Single. However, you can file as Married Filing Separately instead of filing a joint return with your spouse.
You do have the option to file a joint return with your spouse, and include an Injured Spouse form, which will allow you to keep your share of your joint refund. If you decide to do this, you can complete Form 8379, Injured Spouse Allocation.
[Edited 01.13.18 / 3:10 pm]