Optician given prison sentence and non-harassment order for assaults