Effects of pebble accretion on the growth and composition of planetesimals in the inner Solar System