The interstellar radiation field and the production of inverse-Compton gamma rays in the Galaxy