========== Moderator's note =======================================
Have a look at
Hendrik's notes contain a great introduction to path integrals
including the answer to your question. However, for simplicity, I'll
summarize the answer below.
Replace the first expectation value you wrote above by
<q_{j+1}| exp(-i H \delta t) |p_j><p_j|q_j>,
where I've inserted a resolution of identity in the momentum basis |
p_j> (omitting the integration over p_j). As you wrote, you are
already familiar with this step. If H were a function of p alone, then
acting on |p_j> on the right its dependence on p would be replaced by
p_j. For more general Hamiltonians, you have to notice that the same
trick works whenever H can be written as a sum of terms that look like
A(q)B(p), where A and B are arbitrary functions of the operators q and
p. Then, the presence of <q_{j+1}| on the left can be taken advantage
of as well,
<q_{j+1}| A(q)B(p) |p_j> = A(q_{j+1})B(p_j) <q_{j+1}|p_j> .
Both H=p^2/2m and H=p^2/2m-V(q) are of this form, since p^2 = p^2 * 1
and V(q) = 1 * V(q). From here, you can follow the same steps as for
the free particle Hamiltonian to get to the Lagrangian form of the
path integral.
Hope this helps.
Igor