Mostly ditto Pete B's answer. There's little you can do about closing costs.
Some closing costs are government fees. There's nothing you can do about this. Sad and unfair as it is, taxes are not optional and not generally negotiable.
Title insurance and fire insurance are required by the lender. Even if you're paying cash, you don't really want to skip on these. If your house burns down and you have no insurance ... well, if you're worried about saving a few hundred on your closing costs, I assume that losing $200,000 because your house burned down and you have no insurance would be a pretty bad thing. Title insurance protects you against the possibility that the seller doesn't really legally own the property, maybe a scam, more likely a mistake or a technicality. You can, and certainly should, shop around for a better deal on insurance. Last couple of housing transactions I made, title insurance was a one-time fee of around $200. (I'm sure this depends on the cost of the house, where you live, maybe other factors.) Maybe by shopping around I could have saved $10 or $20, but I doubt there's someone out there charging $50 when everyone else is charging $200. Fire insurance you're probably paying a couple of thousand a year, more opportunity for savings.
Typically the buyer and the seller each have a realtor and they split the fee. If you go without a realtor but the seller hires one, she'll keep the entire fee. So the only way to avoid this expense is if neither of you has a realtor. I've never done that. Realtors cost a ton of money but they provide a useful service: not only helping you find a house but also knowing how to deal with all the paperwork. Plenty of people do it, though. I presume they get the title agency or the bank or somebody to help with the paperwork. There are also discount realtors out there who don't show your home, do little or nothing to market it, basically just help you with the paperwork, and then charge a very low fee.
Timing closing for a certain day of the month can reduce what you owe at closing time -- by reducing the amount of interest you pay on the first month's loan payment -- but it doesn't save you any money. You'll make it up over the course of the loan.
You might possibly save some money by timing closing around when property taxes are due. Theoretically this shouldn't matter: the theory is that they pro-rate property taxes between buyer and seller so each pays the taxes for the time when they own the house. So again, you might need less cash at closing but you'll make it up the next time property taxes are due. But the formulas the banks use on this are often goofy. Maybe if you live some place with high property taxes this is worth investigating.
You could skip the inspection. But inspections I've had done generally cost about $500. If they found something that was a major issue, they might save you from buying a house that would cost tens of thousands in repairs. Or less dramatically, you can use the inspection report for leverage with the seller to get repairs done at the seller's expense. I once had an inspector report problems with the roof and so I negotiated with the seller that they would pay for a percentage of roof repair. I suppose if you're buying a house that you know is run down and will require major work, an inspection might be superfluous. Or if you know enough about construction that you can do an inspection yourself. Otherwise, it's like not buying insurance: sure, you save a little up front, but you're taking a huge risk.
So what can you control? (a) Shop around for fire insurance. Maybe save hundreds of dollars. (b) Find a seller who's not using a realtor and then you don't use a realtor either. Save big bucks, 6 to 7% in my area, but you then have to figure out how to do all the paperwork yourself and you severely limit your buying options as most sellers DO use a realtor.
Besides that, there's not much you can do.