Temperature dependence of sodium and ionized calcium resonance lines perturbed by helium