Optimal transport using Newton's method