First, he and River have been flirting since they first met—and, according to the Night in the TARDIS mini-episodes, dating throughout series 6 while Amy and Rory slept. Since he pretty strongly suspected that they were going to be married in his future, and didn't try to break things off, presumably he wanted to marry her.
It also gave him an excuse to tell River to look into his eye, so she can see that he's actually in the Teselecta, and gave them an excuse to touch, thereby resetting the timeline to its original state. That may explain why he chose to marry her at that specific moment, instead of some time later.
On the other hand, combining the two may have seemed like a good way to get hitched without all the fuss and ceremonial normally associated with weddings. The Doctor has, in the past, indicated an aversion to all that palaver:
"I'm rubbish at weddings, especially my own!" - the Doctor (in "Blink")