Raffl, as he was crossing the end line, took a high shot that went in over goalie Jeremy Swayman's right shoulder. It was his first goal in 10 games with Washington after being traded by the Philadelphia Flyers on April 12.
"As soon as [Justin Schultz] rimmed the puck, I looked up and I saw it was like six seconds left," Raffl said. "So he kind of gave me some room, their D-man there, and it was the right play at the right time, I guess."
Carl Hagelin scored for the Capitals (36-15-5), who won four of five to complete the regular season. Vitek Vanecek made 24 saves.
Curtis Lazar scored for the Bruins (33-16-7), who lost three of their last five (2-2-1). Swayman made 30 saves.
With a Stanley Cup Playoff berth and first-round series against Washington set, Boston scratched 15 regular players and used seven skaters who played 10 or fewer NHL games this season.
"Those guys have worked hard to get an opportunity," Lazar said. "It's funny for a guy like myself, new to the team, I didn't know 60 percent of them until tonight before the game. I'm shaking hands and whatnot. We fought hard. A lot of good things to take away from this game and I thought they rose to the occasion."
Ovechkin played 19:00 and had four hits and four shots on goal after the forward missed time with a lower-body injury.
"When he was cleared and deemed healthy, the conversation switched to, 'Which was more important? Getting the feel of the game and touching the puck and making plays or waiting,' and I think the consensus was from everybody, especially Alex, that he wanted to get out there and play and get a feel for it," Capitals coach Peter Laviolette said.
Ovechkin finished the season with 24 goals in 45 games played. It is the first time the Capitals captain failed to score 30 goals in his 16-season NHL career.
"I feel great. The trainers, all the staff did a great job. It was battle, a battle through that (injury)," Ovechkin said. "Right now, I'm 100 percent. I didn't feel any soreness. I feel comfortable. That's the most important thing. This time of year, you have to be smart and you have to think about the future, not only regular season."
The Bruins were 4-2-2 against the Capitals this season. The teams play Game 1 of the best-of-7 Stanley Cup First Round here Saturday.
Lazar gave the Bruins a 1-0 lead at 10:11 of the second period. Jarred Tinordi skated to the net and passed the puck across the crease to Lazar, who stopped it with his skate and shot.
"Nice to see Lazar get on the score sheet," Bruins coach Bruce Cassidy said. "That line (Jake DeBrusk, Lazar and Chris Wagner) created a little offense. They're known, Lazar and 'Wags,' more in a checking role. So they got the puck a little bit more, got to play with it."
Hagelin tied it 1-1 at 16:15 when he knocked in the rebound of Garnet Hathaway's shot.