In return, the Padres will get a pair of prospects in outfielder Edward Olivares and right-hander Jared Carkuff.
Solarte, 30, has spent the past three and a half seasons with the Padres. He hit .255 with 18 home runs and 64 RBIs in 2017 and is a career .267 hitter. He made his big league debut with the New York Yankees in 2014.
The 21-year-old Olivares hit .269 with 17 home runs, 72 RBIs and 20 stolen bases in 120 Class A games with Lansing and Dunedin this year. From Venezuela, he signed with Toronto as an international free agent in 2014.
Carkuff, 24, was 3-4 with eight saves and a 3.86 ERA in 34 relief appearances between Class A Vancouver, Lansing and Dunedin and Triple-A Buffalo last season. He was selected by Toronto in the 35th round of the June 2016 draft out of Austin Peay.
The 33-year-old Stammen was 2-3 with a 3.14 ERA with 74 strikeouts and just 28 walks in a career-high 60 appearances for the Padres last season. He inherited a National League-high 55 runners and allowed just 14 of them to score, including only two with the bases loaded.
In 289 career appearances with Washington and San Diego, Stammen is 28-27 with a 3.80 ERA.
The Associated Press contributed to this report.