Nuclear effects on the transverse momentum spectra of charged particles in pPb collisions at a nucleon-nucleon center-of-mass energy of 5.02 TeV