Clearly, these passages are saying that God is giving Israel a military mission, and hostages are required to be taken. The second passage, in particular, specifies that female captives are allowed one month of mourning before their sexuality is no longer their own.(Deuteronomy 20:10-14)
Â
    As you approach a town to attack it, first offer its people terms for peace.  If they accept your terms and open the gates to you, then all the people inside will serve you in forced labor.  But if they refuse to make peace and prepare to fight, you must attack the town.  When the LORD your God hands it over to you, kill every man in the town.  But you may keep for yourselves all the women, children, livestock, and other plunder.  You may enjoy the spoils of your enemies that the LORD your God has given you.
Â
(Deuteronomy 21:10-14 NAB)
Â
   "When you go out to war against your enemies and the LORD, your God, delivers them into your hand, so that you take captives, if you see a comely woman among the captives and become so enamored of her that you wish to have her as wife, you may take her home to your house. But before she may live there, she must shave her head and pare her nails and lay aside her captive's garb. After she has mourned her father and mother for a full month, you may have relations with her, and you shall be her husband and she shall be your wife. However, if later on you lose your liking for her, you shall give her her freedom, if she wishes it; but you shall not sell her or enslave her, since she was married to you under compulsion."
1. Christian thinking admits various miracles. If the Bible says that the common practices of nature were suspended for a while so that two men could disembark from a boat and walk around on water during a storm, typical Christian interpretation says that's factual, because it's a miracle. So assuming that one month of mourning was observed, it's entirely possible that God commanded capture of hostages, and yet none of them were raped, because one month of captivity was sufficient to make all hostages completely consenting to all wishes of their captors. (I would regard such an event as no less miraculous than a walk on stormy waters, but that's beside the point.)
2. An alternate Christian perspective is that the women in question were not good people when they were captured: they had been worshiping false idols and evil spirits, and they were given a privilege when they were captured, so God was commanding their captivity as a deserved punishment.
3. Another possible interpretation was that God was providing the opportunity of marriage, but that the prospective wives would have full freedom to refuse if they so desired, so God never condoned rape.
4. Still another perspective might be that while Christian scripture is perfect, Old Testament Scripture was written down incorrectly, because the Old Testament had scribes who were inferior to the scribes of the New Testament. Thus any rapes that might have resulted were the fault of the scribes, not of God's perfect commandments. Indeed, the incarnation of Jesus might have been appropriate precisely because human interpreters of God's will tended to make this sort of mistake.