If you're not interested in romancing a character, there's a simple solution - never talk to them.
More helpfully, you can never "accidentally" commit to a relationship. You always have a choice. Most of these relationships can be kept "open" (i.e., still possible, the next time you speak with them) with the exception of Miranda. Yvonne Strahovski doesn't like being lead on, apparently. Here's a quote from the Mass Effect Wikia. Male shepherd only, unfortunately.
For a male Shepard, a love interest is "locked in" once you express
interest at the following dialogue points:
Jack: "I want to talk about us." To prevent locking-in, say "Never
Tali: "I want to talk about you." at the point where she beckons you
toward the drive core. To prevent locking-in, say "So you're not
interested?" followed by "I need to think about this."
Miranda: "Can we talk?" at the point where she says "I don't know what
this is, if it's just stress, or blowing off steam, or..." you can not
opt out; every option results in either becoming locked-in, or the
relationship being broken off permanently. Hope you saved before the