Optimal constant $C$ for a particular pair of distances
$C(r) = r / \lfloor r \rfloor$, where $r = d_2/d_1$ is the ratio of the two distances
As Alexandre has already written in his solution, the global maximum for $C$ is $2$, and it is achieved, when $r$ is just slightly below $2$.
Optimal Racing Strategy
To illustrate how the optimal racing strategy for the runner who runs the longer distance looks like, let's walk through an example.
Johnny runs 10 km in 1 hour. Superman wants to run a marathon in the shortest possible time without exceeding Johnny's average speed on any 10-km-segment. So we have $d_1 = 10000$, $d_2 = 42195$, and $r = 4.2195$.
Superman divides the marathon into k = $\lfloor r \rfloor + 1= 5$ equal segments by placing $\lfloor r \rfloor$ stops at the positions $d_2 * i/k$ for $i=1,...,\lfloor r \rfloor$. In our example, each of the 5 segments has a length of 8439 metres.
Superman then runs each segment at the speed of light and rests for exactly $t_1$ = 1 hour at each stop. Since any interval of length $d_1$ contains exactly one such stop, the time for any such interval is always slightly above $t_1$, as demanded by the rules. Superman's total time for $d_2$ is just an $\epsilon$ above $\lfloor r \rfloor * t_1$ = 4 hours, the total time he spent resting at the stops. His average speed is $v_2 = d_2 / (t_1 * \lfloor r \rfloor) = r * d_1 / (\lfloor r \rfloor * t_1) = r / \lfloor r \rfloor * v_1$.
The $C$ he achieves with this strategy is therefore $r / \lfloor r \rfloor$ = 4.2195 / 4 = 1.054875.
Why is this optimal?
It remains to show that Superman's strategy is optimal. To see this, assume that he finished in less than $\lfloor r \rfloor * t_1$ = 4 hours. Divide his race into $\lfloor r \rfloor = 4$ equal time slices and look at the distance he covered in each time slice. At least one of these distances will be longer than $d_1$, and each time slice is shorter than $t_1$, which means that he violated the speed limit in that time slice.