Optimal Control of R & D Investment in a Techno-Metabolic System