If I am a U.S. citizen entering the United States by car from Canada or Mexico can border guards legally search my car without a warrant?
Yes. At international borders and international airports (because those are the equivalent of a border), US customs officers may do searches of people and belongings without a warrant and without any particular reason to think they'll find contraband. This includes the authority to do some level of disassembly of the car, if they then reassemble it. See United States v. Flores-Montano, 541 U.S. 149. This is known as the "border search exception."
Moreover, police normally don't need warrants to search your car if it was mobile when they found it and if they have probable cause to believe they'll find contraband. This is known as the "automobile exception" or the "motor vehicle exception." It was established in Carroll v. US, 267 U.S. 132. Individual states may have stricter requirements on police searches, but the Fourth Amendment doesn't require police to get a warrant to search your car if, say, you drove it up to a checkpoint and they have probable cause. The difference at a border is that they don't need probable cause and the car never had to be mobile: they can search you on a hunch.
Border searches [are] not subject to the warrant provisions of the Fourth Amendment and [are] "reasonable" within the meaning of that Amendment.
The fourth amendment only denounces unreasonable searches.
Border searches, then, from before the adoption of the Fourth Amendment, have been considered to be "reasonable" by the single fact that the person or item in question had entered into our country from outside. There has never been any additional requirement that the reasonableness of a border search depended on the existence of probable cause. This longstanding recognition that searches at our borders without probable cause and without a warrant are nonetheless "reasonable" has a history as old as the Fourth Amendment itself.
The Ramsey case is full of good stuff, like this:
"But a port of entry is not a traveler's home. His right to be let alone neither prevents the search of his luggage nor the seizure of unprotected, but illegal, materials when his possession of them is discovered during such a search. Customs officials characteristically inspect luggage and their power to do so is not questioned in this case; it is an old practice and is intimately associated with excluding illegal articles from the country."
quoting United States v. Thirty-seven Photographs, 402 U. S. 363, 376 (1971)