Yep.
Of course, not all small sailboats are designed to do this. What kind of boat are you talking about?
It will be your call based on rudder and tiller interference, sheet, backstays, dock lines, etc. that might catch on the motor. There's no inherent reason a motor needs to be held off the transom. It will probably cause less stress than putting it out 8 to 12 inches away.
Pictures of your random might help.
-Will (Dragonfly)