Optical Properties of Dielectric Microcavities Implanted with Rare Earth Atoms