I know that intestinal flora metabolising oligosaccharides, like those found in legumes, is the cause for the well known fact that legumes cause flatulence, but does an oligosaccharide-rich intestine change the composition (i.e. which specific bacteria make it up) of intestinal flora in humans?
The answer to this is fairly complex, and it depends on whether you are talking about short-term or long-term changes to the microbiota.
When talking about short-term changes, the answer is almost certainly a resounding yes. Any ingested nutrient will lead to an increase in the growth rates of bacteria capable of metabolising that nutrient, and will therefore lead to a change in the composition of the intestinal microbiota.
This is, unfortunately, difficult to observe, as most studies of the intestinal microbiota use fecal samples to look at intestinal microbial composition. Since stool represents an average of what happens between two bowel movements, it is difficult to draw inferences about short-term changes in the microbial composition of the bowel. However, there is evidence from Pythons that suggests extensive remodelling of the microbial composition does indeed occur, at least in animals with less regular feeding schedules.
In the case of long-term changes, there is strong evidence that specific oligosaccharides contained in human milk specifically select for certain strains of Bifidobacterium and Lactobacillus. Apart from this very specific set of oligosaccharides however, there is a paucity of studies dealing with the effects of diet on the gut microbiota, and even fewer looking at specific nutrients.
The premise that long-term changes to the gut microbiota can be made with diets is the foundation on which the entire prebiotics industry is built. The most popular prebiotics are fructo-oligosaccharide, inulin, galacto-oligosaccharide and lactulose. These are said to encourage the growth of beneficial strains of Bifidobacterium and Lactobacillus. However, there is currently no consensus on the long-term effects of these oligosaccharides on the microbiota.