The wise men came after baby Jesus was presented in the temple.
If you see a harmony of the Gospels, like Study Resources :: Harmony of the Gospels, you will find that the wise men came long after Jesus was presented in the temple.
Presentation in the temple
A woman who bore a son was ceremonially unclean for forty days (twice that if she bore a daughter Leviticus 12:2-5), that is, she was not permitted to go to the temple or to engage in religious services with the congregation.
Luke 2:22-24 (NASB)
22 And when the days for their purification according to the law of Moses were completed, they brought Him up to Jerusalem to present Him to the Lord 23 (as it is written in the Law of the Lord, "EVERY firstborn MALE THAT OPENS THE WOMB SHALL BE CALLED HOLY TO THE LORD"), 24 and to offer a sacrifice according to what was said in the Law of the Lord, "A PAIR OF TURTLEDOVES OR TWO YOUNG PIGEONS."
The wise men from the East
The wise men saw the star in the east, then went to Jerusalem, they asked, were sent, and finally arrived. So, that took time, possibly up to two years.
Matthew 2:16 (NASB)
Then when Herod saw that he had been tricked by the magi, he became very enraged, and sent and slew all the male children who were in Bethlehem and all its vicinity, from two years old and under, according to the time which he had determined from the magi.
On the other hand, the Mary's offering indicates that she and Joseph were poor. Joseph and Mary were very pious Jews so as not lied in his offering.
Matthew 1:19 (NASB)
And Joseph her husband, being a righteous man and not wanting to disgrace her, planned to send her away secretly.
Luke 2:38 (NASB)
And Mary said, “Behold, the bondslave of the Lord; may it be done to me according to your word.” And the angel departed from her.