Optimal control problem for {L}iapunov exponents of two-dimensional systems