"Such variation can no doubt be explained with reference to the habitats in which individual species have developed."
No, unfortunately, you can't just rearrange the sentence. Without the context of the sentence, it's not clear what "such variation" is referring to.
However, let's look at the sentence. There are two clause, the main and a sub-clause:
"Such variation can no doubt be explained"
and
"... with reference to the habitats in which individual species have developed."
The first clause "such variation can no doubt be explained" would normally either stand alone, or be followed with 'by' and the explanation.
In the sub-clause, "habitats in which individual species have developed" is a noun-clause, so the question is what is "with reference to" doing in this sentence?
"can no doubt be" is a weaker form of "is" which is easier to defend! The 'with reference' is introducing something for the reader to 'refer to' or 'take into account'.
So really the sentence can be reworded to say (more clearly, but less easily defended!):
"Such variation is explained by taking into account (selection pressures of) the habitats in which the individual species have developed."
(Where 'selection pressures' are the driving forces behind the development/evolution of individual species).
I hope this helps.