Lopez has been used primarily in league matches this season, while Casillas has featured the successful Champions League and Copa del Rey campaigns.
Now Ancelotti has announced he will switch between the two goalkeepers for the final four league games of the season before the final against Atletico Madrid on May 24 in Lisbon.
The Real coach told the club's official Twitter feed:
Diego Lopez will play against Valencia & Celta, Casillas against Valladolid & Espanyol.
Casillas needs to prepare for the #UCL final during this month.
Ancelotti also had good news on the fitness of Sami Khedira, who has not played since suffering knee ligament damage in November.
The Germany international will start on the bench against Valencia on Sunday May 4, with Real planning a practice match next week to help his fitness.
Ancelotti added, via Real's Twitter feed, @realmadriden:
Khedira is available for tomorrow. He will start on the bench.
Khedira will come back slowly. We will organise a friendly in Valdebebas next week to help him improve.