Yes. If your car is impounded, the police are allowed to conduct a thorough search of it, including its trunk and any closed containers that they find inside. This is true even if your car was towed after you parked it illegally or if the police recover your car after it is stolen.
The police are required, however, to follow fair and standardized procedures when they search your car, and may not stop you and impound your car simply to perform a search.
To learn more about search and seizure, and all aspects of criminal law and procedure, see The Criminal Law Handbook: Know Your Rights, Survive the System, by Paul Bergman and Sara J. Berman (Nolo).