Pérez had been waived by the Cleveland Indians.
The 24-year-old reliever went 4-0 with a 1.87 ERA and three saves across 30 appearances for Double-A Akron and Triple-A Columbus this year. He struck out 82 batters and walked 29 in 53 innings.
Pérez made his debut in the majors on Aug. 12 and had a 4.05 ERA in four appearances for Cleveland.
The 29-year-old McGowin has appeared in 48 games, 46 in relief, over four seasons with the Nationals, with a 5.98 ERA.