Shaking usually denotes either anxiety, fear or pain.
Baby aspirin can be given to your dog (dosage varying on size), but if this has no effect then unfortunately your vet is the only person qualified to make a further assessment.
There are so many conditions in which shaking and anxious behaviour are a symptom that, anyone offering advice over the internet without properly examining your dog will only be guessing.
So, as I said, try the baby aspirin, try calming him down or getting him settled (he may have been spooked by something or picked up on something you haven't realised). And if none of these actions cure the weird behaviour, then seek professional advice as a matter of urgency as it will then become obvious your dog is suffering on some way.