A formulation for fractional optimal control problems via left and right caputo derivatives