Leds have to be driven using constant current, you will never get the current right using voltage regulation and even if you do the current will change with temperature.
Lm317 can probably do it with a consumption of about 1W (3.4v * 0.31A) but a switching regulator would make the battery last longer.
Leds can´t be voltage driven because the voltage on them is not a constant and they act like diodes, which means even a small voltage error can lead to a large current increase. You can use a voltage source and place a limitting resistor in series or you can current drive them.