Dimers of polar chromophores in solution: role of excitonic interactions in one- and two-photon absorption properties