Can I hide "sold" or "expired" items on the auction house search?

No, currently there is no way to hide the sold/expired listings.

Sometimes I actually find them helpful because I know for sure that something similar at the price they were listed at will sell. I do this by altering my max buyout price until I have a rough idea of what the buyout of the sold item was.