Optimal Control of Information Diffusion in Compartmental Networks