On the microscopic origin of the photochromic and photorefractive behavior of doped Bi4Ge3O12 single crystals