If the laser is visible on other players guns, then it is not allowed. If the laser only shows when you are holding the gun, then it's fine.
For scouts, the same applies above but the laser must also not move when you are moving. A static dot for the scout would be fair enough since you can just put a dot on your screen anyways.