Control over the distribution of luminescent impurities inside opal photonic crystals