Bad news first: there is a good chance that your foster dog will not be fully housetrained before you send her off to her forever home.
I say this not to be discouraging, but to set realistic expectations. Housetraining is a long process. There are occasional dogs (especially mature adults and seniors) who are already potty-trained upon arrival. And there are some whose innate cleanliness makes them very easy to housebreak; I've had two fosters who each had a single accident in the house, were corrected for it once, and never did it again. But for most dogs it's not quite that easy, and since most trainers agree that you can't truly call a dog "housebroken" until he's gone a month or more with no accidents, it is very likely that your foster dog will move on to his adoptive home before meeting that standard.
Even if your foster pup does seem to be housebroken, there's a fair chance that she will have an accident or two upon moving to a new home. Dogs don't generalize well. "Don't pee in the house" frequently means your house, not someone else's. It is so common for foster dogs to have accidents shortly after going to their adopters' homes that I half-jokingly call it the Potty Test: this is how they find out if their new people really love them. If pooping on the carpet within thirty seconds of coming inside doesn't tank the adoption, it's a match made to last.
Anyway, that's the bad news. The good news: there's a lot you can do to get your foster pup off to a strong start in the time that you do have, and by happy coincidence, these are the same things that will (hopefully) preserve your sanity by reducing the number of times you have to mop up pee puddles.
Take the dog out frequently. Really frequently. At least every hour if your foster is a puppy, every two hours if she's over six months. Take the dog out, don't just let her out into the yard unsupervised. Try not to crowd her, and make sure she's actually emptied out so that you don't interrupt her prematurely, but be ready to praise her and give her treats as soon as she finishes her business. After every week that goes by with no accidents, you can increase the time between potty walks by 30 minutes for a puppy and an hour for an older dog.
Don't ask her to hold it too long. As a rule of thumb, most puppies over eight weeks of age can hold it for a maximum of hours equal to their age in months plus one. A three-month-old puppy can hold it for a maximum of four hours, a five-month-old puppy has a maximum of six hours, and so on, up to a maximum of about eight hours for an adult. If you will be unable to take your foster pup out within that time, you need to make arrangements for someone else to do so. Ask a neighbor to help, hire a dogwalker for a few weeks, or come home in the middle of the day if you can arrange to do so. Be aware, too, that there are many dogs who can't hold it as long as that loose rule indicates, especially among smaller breeds. Think of this as an absolute maximum, not as the period of time that you should routinely expect your foster pup to wait between potty walks.
Supervise her closely in the house. For 15 to 30 minutes after your foster pup has emptied herself out, she can be allowed to wander around in whatever rooms you've designated as permissible areas, but you should always keep a close eye on her. When you cannot directly supervise the foster pup, and/or after that 15-to-30-minute free period, confine her in a small area. An appropriately sized crate is best, as that encourages the dog to hold it rather than soiling her sleeping area, but an X-pen or easily cleaned room such as a tile-floored bathroom are viable alternatives.
Correct her only if you catch her in the act. When (not if!) you catch your dog in the act of urinating or defecating in your home, interrupt her with a startling noise ("No!" or "Oops!" or a loud clap of your hands, etc.) and immediately take her outside to finish up. Praise and treat lavishly if she does finish going outside.
Do not correct her for past mistakes. If you take your eyes off your foster pup and find a puddle ten minutes later, it's too late to correct her. The dog will not understand what she's done wrong. Do not hit the dog with a rolled-up newspaper or rub her nose in the mess or anything else of the sort; all this does is make your foster pup hurt, confused, and suspicious of you. Just clean the mess up quietly and resolve to watch her more closely in the future.
Use an enzymatic odor neutralizer after cleaning up accidents. No matter how thoroughly you scrub, soap and water alone will not get rid of a lingering potty smell. (There might be nothing perceptible to your nose, but your foster dog's is much more sensitive.) Dogs are much more likely to urinate or defecate in places that they can smell were already used for that purpose. Using an odor neutralizer -- whether a commercial formula or a dose of white vinegar -- makes it less likely that your carpet will become a regular doggy bathroom. You might also block off a too-tempting area by putting furniture or stacks of books on top of the spot after you clean it. I have a pile of old textbooks that I keep around for just this purpose.
If your foster dog squeaks in the middle of the night, take her out. As annoying as it can be to hear whines and squeaks coming from your foster pup's crate at 3 a.m., the dog is actually doing you a favor. She is telling you that she has to potty. Put your shoes on and take her out. If you don't, you're probably going to have a big mess to clean up in the morning, and if it keeps happening, your foster dog might get in the habit of soiling her crate. Then you're really in trouble, because your best management tool will be gone.
Feed meals on a regular schedule and limit access to water an hour before bedtime. Knowing when food went in will eventually enable you to predict when it will come out. Limiting your foster pup's intake of water before bed reduces the chances that she'll have to go out in the middle of the night (or, worse, will just pee in the crate). Adult dogs may not have a problem with this, but puppies frequently do.