The Perspective Tool allows you to modify the perspective of your image. It has full History support, meaning each modification (such as handle dragging and option toggling) can be undone.
The settings can be adjusted from the pop-up dialog after selecting the tool: