Field-assisted solid state doping of glasses for optical applications