A model for the population of binary stars in the Galaxy