Controlled engineering of rare-earth doped core-shell nanocrystals