We have compared the gain dynamics of the ground state excitonic transition between undoped and p-doped electrically-pumped InGaAs quantum-dot optical amplifiers, for temperatures from 300K to 20K. A pump-probe differential transmission technique in heterodyne detection with sub-picosecond time resolution was used. The comparison shows that in the gain regime at high temperatures the recovery dynamics of the p-doped sample is slower than in the undoped device operating at the same modal gain, due to a reduced electron reservoir in the excited states. Conversely, at 20K the initial gain dynamics is faster in the p-doped device due to hole-hole scattering.