No shortage of taxis anywhere in Spain at bus and train stations...don't worry about that. I suggest you take the bus over the train (to Segovia) for reasons discussed in another similar thread.
For the more adventurous (and late arriver) consider hiring a taxi for the trip to Segovia...sounds loco, but if you absolutely don't want to stay in Madrid that night, it's a viable option. Set a price prior to leaving, though, and get the driver's info (you'll have time on the drive up). I taxied from Segovia to Avila years back, and remember it being reasonable, especially since you'll be getting door-to-door service.
_________________________
Ongi etorri!