Scott Stallings birdied the final hole to snatch a one-shot win in the Farmers Insurance Open at Torrey Pines.