Shedding light on electronically doped perovskites