Semiclassical limit for nonlinear Schrödinger equations with electromagnetic fields