Eye tracking optical system with a metalens