Concentrating solutions of some singularly perturbed elliptic equations