Resonant modification of the Rabi oscillations of a two-level system