Structural imaging and electro-optical control of two-dimensional semiconductors