The first thing to realise is that a child with ASD can also be naughty. They can work out when you're making allowances for their difficulties and use it to their advantage. Let's face it. What child wouldn't?
Meltdowns triggered by Autism tend to be as a result of something the child can't cope with. This could be a change in routine, sensory overload, too many social demands, etc. The meltdown is a way of releasing the emotions they can no longer tolerate. They are often totally overwhelmed and unaware of the reactions of those around them.
Tantrums which are bad behaviour tend to have a purpose. The child is acting out because they want something. They keep tabs on your responses and adjust their behaviour accordingly to try to make you give in.
Tantrums are usually reserved for people and places where the child feels safer to expresses him or herself.
Meltdowns occur more around other people and in public because those are the places overloads are more likely to occur. A common exception to this is where children shut down their emotions outside home because their anxiety level is too high to allow them to express themselves where they don't feel totally safe. These children often repress their emotions until they get home at which point they explode.
There is a saying that you can sure Autism by putting the person who has it in a room on their own surrounded by what things that interest them. Your little boy is probably very compliant at home because the things which cause him the biggest problems simply don't exist there.
Your approach is the right one regardless of whether his behaviour is triggered by Autism. Walloping doesn't solve anything and neither does shutting children in their rooms. In fact shutting a child with Autism in their room could be a reward. My daughters would certainly see it that way.
Have a think about your behaviour management at home. Say you wanted him to tidy some toys away and he didn't want to do it. Do you have behaviour management strategies that you could use to ensure that he did it?
Now think about when you are out in a busy place. Do the same strategies work there?
If his response in the two situations is wildly different that suggests that the problem is his response to the environment, not your parenting.
If you couldn't manage his behaviour anywhere, including at home, that might be an indicator that at least some of his behaviour is about your management of it. However, some children can have behaviour triggered by Autism and made worse by poor behaviour management so you still can't rule it out.
Your description seems to be of a little boy who wants to comply and will do so whenever possible, i.e. in a calm, familiar, predictable environment, but who doesn't have the tools to understand and manage the overload which sends him into meltdown when the environment is challenging.
I agree that you should see your GP and ask for a referral to CAMHS or a Developmental/Community Paediatrician for further assessment. Keep that diary because that's your evidence that your behaviour management is consistent and that the outbursts are triggered by external factors that make him anxious/stressed.
In the meantime read more about Aspergers and keep doing what you are doing.