Optimal control of quantum gates in an exactly solvable non-Markovian open quantum bit system