A Forward Propagation Algorithm for Online Optimization of Nonlinear Stochastic Differential Equations