Optimal taxation in R&D driven endogenous growth models