Luminescence of nitrogen and neon atoms isolated in solid helium