My, layperson, understanding is that if they can interbreed and produce fertile offspring, then they are the same species. So two types of fly that can't inter-breed would be classified differently.
I don't think that's quite accurate (for example, ligers are capable of reproduction, though they would never be born 'naturally' due to the vast geographical separation of lions and tigers in the wild) but it might point you in the right direction.