how does carbon dioxide affect photosynthesis