After gaining the Master Sword, Link is cleansed of the magic that kept him in wolf form, obtaining the Shadow Crystal.
What does Link obtain that gives him control over his transformations?
Shadow Crystal