Yes; the American soldiers based in Britain are allowed to (and do) wear US military uniforms. There are however, laws about who may wear different uniforms, but you can only be arrested or charged for wearing a uniform you aren’t entitled to in certain circumstances.