Electro-optics of perovskite solar cells