The clustering of the SDSS-IV extended Baryon Oscillation Spectroscopic Survey DR14 quasar sample: anisotropic Baryon Acoustic Oscillations measurements in Fourier-space with optimal redshift weights