Ramirez homered to break a 1-1 tie in the seventh, then added a two-run homer in the eighth. The Marlins' leadoff man has five home runs this season.
"It's good for me," Ramirez said, "but I'm more excited that we won the game and Oly got his third win. ... That's what we need -- more innings from our starting pitchers."
Olsen (3-0) gave up one run to lower his ERA to 2.60. Bouncing back from a bad year in 2007, he has quickly become the best starter in Florida's shaky rotation.
"Scott Olsen -- wow," manager Fredi Gonzalez said. "Another dominating performance. That's about as good as it gets.
"Maybe last year was just a good year to learn. Everybody has a little blip. Maybe that was Oly last year, and we're seeing the new Oly."
Olsen went 10-15 in 2007 with an ERA of 5.81, highest of any pitcher in the National League with at least 162 innings. The excitable left-hander had problems off the field, too, including a DUI arrest and a two-game suspension following a confrontation with a teammate.
"Last year was a very long year," Olsen said. "Everybody knows about it. I'm still here, thank God, and I'm just trying to learn from everything, off the field and on the field."
Washington's Odalis Perez pitched six innings but remained winless despite allowing only one run, which was unearned. Ramirez homered near the 434-foot sign in center field on the first pitch from reliever Luis Ayala (0-1) to start the seventh.
Ramirez added a two-run homer to center in the eighth -- the first home run allowed by Saul Rivera since April 24, 2007. With a 2-for-5 day, Ramirez raised his average to .366.
"That's our superstar," Olsen said.
The surprising Marlins took two of three in the series. Despite ranking next-to-last in the NL in ERA, they've won four of their six series this season.
"It's very nice to win," Olsen said. "Everything seems a little bit better when you're winning."
The mood was much different in the last-place Nationals' clubhouse after they fell to 1-5 against Florida. Their 5-14 record is the worst in the major leagues.
"We're better than we're playing right now," manager Manny Acta said. "Our starters have been giving us enough chances, but it's not easy to win 1-0."
Austin Kearns hit his second homer leading off the fifth for Washington's first hit and only run. The Nationals totaled five hits and are last in the majors in batting at .219.
Two Washington defensive lapses helped the Marlins score four runs in the eighth. Jorge Cantu doubled off Rivera and took third when center fielder Lastings Milledge lost Cody Ross' routine fly in the sun and it fell for a double.
"The inning turned out to be pretty ugly," Acta said.
Washington pinch-hitters are batting .083 (3-for-36).
"We're just playing losing baseball right now," Estrada said.
Zimmerman went 0-for-3 against Olsen, dropping his average versus the lefty to .130 (3-for-23). ... Florida is 13-for-14 on steal attempts. ... At 3-9 on the road, Washington has the most away losses in majors.