Path integral formulation of quantum electrodynamics from classical particle trajectories