Nonlinear Optimal Control of Oxygen and Carbon Dioxide Levels in Blood