We investigate the possibility of inducing transitions between periodic orbits in two-dimensional Hamiltonian systems by means of a time-localized external perturbation. We show that the amplitude of the perturbation can be approximately calculated in the limit of a delta-type force in terms of the initial and final periodic orbits. For a specific Hamiltonian, we show several numerical examples where the external perturbation, varied from delta-type to gaussian, allows transitions between specifically chosen members of families of periodic orbits. The same mechanism is then applied to move aperiodic chaotic orbits into periodic ones, presenting a new way to control chaotic behavior in Hamiltonian systems.