Optimal control problems with applications to the elimination of substrate diffusing and convecting through immobilized enzyme