If $v_1$ and $v_l$ are fixed then constructing a minimum weight breadth-first tree of height $l{-}1$ and finally optimally attach vertex $v_l$.
Iterating over all candidate pairs of $v_1$ and $v_l$ would then yield the optimal solution.
Minimum weight breadth first trees seem to be the method of choice for controlling the number of edges of paths.