If you are legally married as of 12/31/2017 then you can only file a 2017 tax return as Married Filing Jointly or Married Filing Separately.
What you enter on the W-4 that you give to your employer for tax withholding has no relevance to your filing status on a tax return.