Generally, the answer would be yes. However, if the Consulate rejects your wife’s visa application on substantive grounds (lack of evidence of work; failure to substantiate Employer-Employee Relationship; violation of status, etc.) it may be harder for her to apply for an H-4 visa immediately after an H-1B visa rejection. Therefore, it is important to ensure your wife has all the paperwork required for successful stamping before she leaves the U.S.