Your first premise sentence is inaccurate. In most cases in modern current society, at least for people who are well enough off, there is no substantial threat of losing the ability to pay for basic needs because of minor infraction fines. There is already a great abundance of food, shelter, clothing, etc at low enough price that many people can pay quite a few fines before worrying about their actual needs. Even wealthy people without any fear of poverty still tend to avoid paying fines for a wide variety of reasons that may have nothing to do with need fulfillment.
The issues of motive and punishment are more complicated than just what is actually provided, of course. What people do (and how they respond to potential punishments) is determined more by their psychology than by their needs, and may have nothing to do with needs. Even when people's psychology concerns needs, it's often wildly inaccurate to the actual facts - for example, many wealthy people are full of fears about losing their money and becoming homeless, or variations on that theme, even though it takes a lot to actually become homeless even for lower-class people in the same society.
At the "Star Trek" level of post-scarcity which you've defined, I imagine most of the scarcity-and-survival pathological thinking we see today would have been healed and replaced with new attitudes. However I don't think that some form of tradable money would not exist at all. Even in Star Trek per se, there are some commodities and there are traders e.g. Romulan Ale, Tribbles, spaceships, artifacts, real estate (see Kirk talking about selling a home in Star Trek Generations) and I imagine there are service trades as well. See http://en.memory-alpha.org/wiki/Money. Having a system of trade is useful and can provide motivation and counterincentive, as long as there is anything that's a limited commodity or service, even if all needs and most common wants are provided for. So fines should still be somewhat of an option, even if they are less significant than in a society where nearly everyone lives in fear of being allowed to starve or freeze or go without medical care, etc.
In Star Trek we also see people being confined, imprisoned, sent to psychiatric prisons, disgraced, relieved of their positions/titles/jobs, and even marooned on unsettled planets.
There is a vast array of things that a society could use to punish and deter crime, even if they had unlimited goods, robot services and free holodecks, including (with my suggested options for minor crimes in italics):
Corporal punishments:
Death
Dismemberment / Drugs
Torture
Pain
Discomfort, tickling, itching powder
Exclusion:
Banishment / Exile (measured in degree, space, and/or time limits)
Confinement
Deprivation of various rights (many options here)
Deprivation of various services (can be measured by degree, type, time, or a credit/money system)
Deprivation of property
Social:
Reputation, humiliation
Social class, memberships
Removal from professional / academic positions
Added duties or community service
Apologies, atonements, services
Oaths, contracts
Reeducation / Therapy / Counseling / Spiritual assignments
- In other words, much as we do now, consequences for minor infractions could be like:
speeding - dangerous: fine against luxury credits, reduced driving or speeding rights, traffic class, promise not to speed dangerously again for a period or receive steeper penalty, and/or public record of dangerous speeding
speeding - trivial: small fine, brief reduction in speeding rights, or need to have a hearing/training session
trespassing - major: payment/reparations to whoever you trespassed against, apology, public record, temporary restraining order, counseling, etc.
trespassing - minor: small fine or payment to whoever you trespassed against, apology
jaywalking in a dangerous area - minor pedestrian education session, or requirement to sign contract taking full responsibility for consequences