The Rays won their fifth in a row and ended Boston's five-game winning streak.
Jeremy Hellickson (4-0) gave up just five hits with six strikeouts over six innings to get the win. Boston's only run came on a looping, two-out single to left-center in the sixth by Daniel Nava.
After Boston tied it in the sixth, Tampa Bay regained the lead in the bottom half of the inning. Matt Joyce led off the frame against Clay Buchholz (4-2) with a single and moved to third on a base hit by Carlos Pena. Scott then hit a fly ball to right that was deep enough to bring home Joyce.
Fernando Rodney gave up a two-out single in the ninth before collecting his 12th save.
Tampa Bay's first run scored on a balk by Buchholz in the second inning.
Campus cop fatally shoots Texas student during traffic stop
Wisconsin business offering 'therapeutic cuddling' forced to close