I've used that circuit before, in the same application and it works.
Yes, D1 can be removed, if you can guarantee the solar panel won't be connected backwards. How much current can the solar cell produce? If it's >1A, use a larger diode, as the LM317 might not current limit until 2.2A.
I would also recommend adding a 33V zener diode across U1. I had problems with the LM317 failing, which I put down to lighting strikes and the zener fixed it. Obviously it doesn't protect against a direct strike, but it will suppress shot spikes, capacitively or inductively coupled from a nearby strike.
I thought you wanted to vary the battery voltage, depending on the temperature? You could make part of R1 or R2 a thermistor.