Reflective optical sensor for long-range and high-resolution displacements