Doped silica-based glasses containing metals containing beryllium, magnesium or alkaline earth metals