I think the problem would have been more naturally stated in the context of bicycles. In any case, the answer is as follows:
You are looking for an optimal velocity function $v: [0, T] \to \mathbb{R}_{\geq 0}$ satisfying some conditions. Each such function represents the strategy, "if the light is still red at time $t$, travel at speed $v(t)$; when the light turns green, coast." One of the conditions on $v$ is that you may not run the red light. In terms of the function $v$, this condition may be written as $\int_0^T v(t) \, dt \leq d$.
The quantity you wish to compute is the expcted expected speed at which you will pass through the red light after it turns green. By the givens (uniform distribution, the nature of our strategy), this expected speed is precisely the average value of $v(t)$, i.e., it is $\frac{1}{T} \int_0^T v(t) \, dt$.
Putting the last two paragraphs together, we see that the optimal expected speed is $\frac{d}{T}$. Moreover, this expected speed is achieved for any choice $v(t)$ with the property $\int_0^T v(t) \, dt = d$, i.e., for any strategy that will get you to the stoplight within time $T$.
Added in edit: I agree with Willie Wong that maximizing the expected kinetic energy with which you pass through the light should be more physically relevant to, say, a bicyclist coasting on a shallow down-hill.

