I think $M$ is assumed to be connected and complete (otherwise just puncture your manifold somewhere to remove a geodesic returning to $p$). I think you are looking for theorem 17.3 in Milnor's Morse theory. By the assumptions the homotopy type of $\Omega(M,p,p)$ is a CW complex with one cell (as there is only on geodesic from $p$ to $p$). This means in particular that $\Omega(M,p,p)$ is connected and all higher homotopy groups vanish.
But then, in view of $\pi_k(\Omega(M,p,p))\cong \pi_{k+1}(M)$ all homotopy groups of $M$ vanish as well. Thus $M$ is contractible.