Are 23mm tires on a 25mm rim (21 mm internal width) safe?
Actually, tires narrower than rims have an aerodynamic advantage, there's a "105%" rule of thumb that states your rim should have width equal to 105% of measured tire width. That's why aero rims are getting wider year by year, all in order to accommodate a wider tire, which also brings comfort and lower rolling resistance. Here's an explanatory article (archive) by Joshua Poertner, who used to be a technical director at Zipp (source).

In your situation, the only factor that limits tire width is frame/fork clearance, you will be fine even with a 23mm real width tire, not mentioning a Conti tyre that runs wider than claimed.

On a side note, 25mm outer / 21mm inner rims aren't even that wide by today's standards, there are 28mm (I own a set) and even 30mm road rims available.

Update: recently, I had the same question about 26mm tire on 25 ID rim and some people pointed out this might cause riding on sidewalls during sharp turns. Something to keep in mind for sure.