Generalized-master-equation theory of excitation transfer