What you need is Kepler's equationKepler's equation, $$M = E - e \sin E$$ where $M$ is a quantity called the mean anomaly, e is the eccentricity of the orbit, and $E$ is called the eccentric anomaly, defined by this diagram where the sun is at $F$ and $C$is the center of the ellipse (the distance $e$ in the diagram should be $ae$).
The quantity $M$ is simply $2\pi t/T$ where $T$ is the orbital period and $t$ is measured such that $t = 0$ at periapsis (so that $M = 0$ coincides with $E = 0$). Thus if you can calculate the eccentric anomaly for two points on the orbit, say $E_1, E_2$, the transit time $\tau$ is $$\tau = \frac{T}{2\pi} (M_1 - M_2) = \frac{T}{2\pi} \bigg ( E_1 - E_2 - e (\sin E_1 - \sin E_2) \bigg)$$
It may be the case that the angle $f$ in the diagram above, called the true anomaly is easier to calculate. In that case, $f$ and $E$ are related by $$\tan \frac{f}{2} = \sqrt{\frac{1+e}{1-e}} \cdot \tan \frac{E}{2}$$ which can be solved for $E$.