Establishing connections between material impurities and charge transport properties in emerging electronic and quantum materials, such as wide-bandgap semiconductors, demands new diagnostic methods tailored to these unique systems. Many such materials host optically-active defect centers which offer a powerful in situ characterization system, but one that typically relies on the weak spin-electric field coupling to measure electronic phenomena. In this work, charge-state sensitive optical microscopy is combined with photoelectric detection of an array of nitrogen-vacancy (NV) centers to directly image the flow of charge carriers inside a diamond optoelectronic device, in 3D and with temporal resolution. Optical control is used to change the charge state of background impurities inside the diamond on-demand, resulting in drastically different current flow such as filamentary channels nucleating from specific, defective regions of the device. Conducting channels that control carrier flow, key steps toward optically reconfigurable, wide-bandgap optoelectronics are then engineered using light. This work might be extended to probe other wide-bandgap semiconductors (SiC, GaN) relevant to present and emerging electronic and quantumtechnologies.