The British pair move into the tournament following the withdrawal of Romania's Irina-Camelia Begu and Monica Niculescu, due to the latter's injury.
Niculescu is also out of the singles competition and is replaced by Hungary's Timea Babos.
Baltacha and Keothavong, who lost in the first round of Wimbledon in doubles, have both been handed wild cards for the singles event but had missed out on the doubles - until now.
Heather Watson and Laura Robson, who successfully teamed up for Great Britain in the Fed Cup earlier this season, have a doubles wild card so Team GB will now have two pairs in the women's doubles.
The Olympic tennis tournament takes place at Wimbledon from July 28 to August 5.