The optical excitation of a quantum dot leads to Rabi oscillations. If a quantum dot ensemble is considered, due to the spread of frequencies, observations are made stemming either from the single dot dynamics or from ensemble effects. To unravel the different phenomena, photon echo techniques are employed, where different laser pulses are used to excite and probe the system. A new development is to use spatially modulated laser pulses, which have a flat-top spatial shape instead of a Gaussian one. In a joint theoretical and experimental effort, we reveal phonon effects on the Rabi oscillations. A better understanding of the dynamics is useful to shape and control photon echos and go towards photon memory applications.