Optical probing of the metal-to-insulator transition in a two-dimensional high-mobility electron gas