Metasurface optics with on-axis polarization control for terahertz sensing applications