The tennis will be played on clay at Roland Garros – home of the French Open – where 21-year-old Alcaraz was victorious last week, securing his third Grand Slam title.
Nadal, 38, is a 22-time major winner, with a record 14 championships coming at Roland Garros.
The Games begin on 26 July with the tennis tournaments starting a day later.
“One pair, which I think everyone knows and was hoping for, is Carlos Alcaraz and Rafael Nadal,” said Spain’s national team coach, David Ferrer.
“Rafa and Carlos will be playing together in Paris.”
Nadal won an Olympic gold at Beijing in 2008, but Alcaraz will be making his Games debut.
Nadal’s participation at the Games was uncertain after a series of injuries this year, but he returned to action for the clay court season in April.
The Paris Games are likely to be his last, with the Spaniard considering retirement this season.
Briton Dan Evans said partnering Andy Murray at the men’s doubles in Paris “would be the stuff dreams are made of”.
Evans said the pair hope to find out if they will represent Team GB this summer on Sunday, and added he has “not paid attention” to the qualifying permutations.
“Playing with him anytime is special,” said Evans. “He’s a legend of the sport – a legend of British sport.”
“If I did get the chance that would be something to tell the grandkids about and hopefully get a medal, that is the plan.”
Evans and Murray were given a wildcard to play doubles at the French Open in May but were beaten in the first round.
Murray is a three-time Olympic medallist having won gold in the singles and silver in the mixed doubles in 2012, and gold in the singles in 2016.
Evans is hoping to play at his first Olympics and is targeting the “singles and doubles” at this summer’s tournament.
“You’d be at it all night and all day to try and work out the permutations,” he added. “I’ve not spoken to Andy about it.”