Determinants and evolution of metabolic interactions in synthetic microbial communities