How do I decide what capacitor to use in a circuit?
Relax...

It will work just fine. Make sure to orient the positive terminal towards the input pin of the regulator (pin #1). 

To be extra sure, use two in parallel (since you have them anyway!) to reduce the equivalent series resistance (ESR). That's just a precaution since I haven't read your datasheet and electrolytic types can be higher ESR than ceramics.

Also, I'm assuming your maximum input voltage is less than 25V.

Sizing...

The values given are the minimum value needed for stability plus a little margin (usually). 

The regulator is a closed-loop system. It watches what happens on the output and adjusts "stuff" internally to make sure the output (really a scaled-down version of the output) always equals a desired value.

Problems occur when it starts chasing its tail. If, as a result of it changing "stuff" internally, the input voltage also starts to change (or the output changes too quickly) then the changes the regulator made will have too much of an effect and it will have to undo the excess. 

This corrective change can also overshoot the mark, requiring another corrective change... as you can see, without sufficient "stability" in the system, the regulator can output a continuously fluctuating voltage rather than the flat line you hope for when employing a regulator.

The capacitors slow down voltage changes, thereby helping to ensure overall stability.