In-situ control of on-chip angstrom gaps, atomic switches, and molecular junctions by light irradiation