Check your bicycle "dynamo", all the ones I have seen are actually alternators, i.e. they produce AC not DC. If it is an alternator, then the simplest solution is to buy or make a bridge rectifier (using Schottky diodes for low voltage drop) and use this to charge a NiMh rechargeable battery, which powers the lights. To avoid overcharging the battery if you cycle with the lights off, use a double pole switch so that you disconnect the dynamo at the same time as disconnecting the lights.
If you don't want to use a rechargeable battery, then have the dynamo drive the lights through the bridge rectifier, and the battery drive the lights through a single Schottky diode.