We consider an extension of the Monge.Kantorovitch optimal transportation problem. The mass is transported along a continuous semimartingale, and the cost of transportation depends on the drift and the diffusion coefficients of the continuous semimartingale. The optimal transportation problem minimizes the cost among all continuous semimartingales with given initial and terminal distributions. Our first main result is an extension of the Kantorovitch duality to this context. We also suggest a finite-difference scheme combined with the gradient projection algorithm to approximate the dual value. We prove the convergence of the scheme, and we derive a rate of convergence. We finally provide an application in the context of financial mathematics, which originally motivated our extension of the Monge.Kantorovitch problem. Namely, we implement our scheme to approximate no-arbitrage bounds on the prices of exotic options given the implied volatility curve of some maturity.