Yes, it's possible to inspect prior to writing an offer, assuming that the seller will allow it.
However, it's not the same as test driving a car. It doesn't cost you anything to test drive a car, in fact it's rather fun. I don't know many people who "enjoy" a typical home inspection (excepting, perhaps the inspector)... and there's a cost to doing the inspection... in both time and money (often $350-$750.00 depending on property.)
Why would you spend $350.00 or more, before you even know if you can come to an agreement on a purchase price? Perhaps the seller isn't even willing to budge a dime.... and you have no intention of paying full price. Well, then you just wasted your inspection fee.
Better, in my opinion, to come to a meeting of the minds, regarding the sale... ie: purchase price, closing date, whether/which appliances will be left, who pays for transfer taxes... etc... and once you've come to some agreement, THEN have the property inspected. Most states purchase agreements allow for some type of negotiation, should some major defect be found.