Sharp stability estimate for the geodesic ray transform