In this paper, an optimal control scheme with known final time is presented for continuous time fractional order nonlinear systems with an unknown term in the dynamics of the system. Fractional derivative is considered based on Caputo concept and fractional order is between 0 and 1. First, a neural network observer with fractional order dynamics is designed to estimate system states. Weights of the neural network are updated adaptively and the update laws are presented as equations of fractional order. By using the Lyapunov method, it is shown that state estimation error and weight estimation error are limited. Then, the optimal control problem with known final time for fractional order nonlinear systems is presented based on observed states. Finally, the simulation results show efficiency of the proposed method.