In most municipal and county law enforcement agencies all police officers go through the basic police training and complete their probation in the street. After you have some time on the job you begin to specialize. Many police officers do become orientated toward traffic enforcement and go to accident investigation, enforcement or motors.
Here is a summary of what an lapd traffic officer does:
On the other hand, many states have state-wide enforcement functions, typically a highway patrol, etc. They are directly orientated at traffic enforcement - here is a good link: