1 of 3

The Rema in Even Ha'Ezer 1:6 writes that one fulfills the mitzvah of p'ru u'revu with a child who is a mamzer, which by definition is out of wedlock:

היה הבן ממזר... קים המצוה

If the child is a mamzer, he fulfills the mitzvah.