Technological diffusion in a modified Ramsey model