Just because the Marshalltown Police Department was involved in the arrest or citation of a person for a crime or for a traffic ticket does not mean the prosecutor for the case is the Marshalltown City Attorney. It depends on the charges that are filed. The City, through the Office of the City Attorney, prosecutes only municipal simple misdemeanors, including violations of the City's traffic code, and municipal infractions committed inside the Marshalltown city limits.
If your ticket, citation, or court documents reference a Marshalltown city ordinance violation, then the City Attorney is the prosecutor. If your citation, ticket, or court document does not refer to a city ordinance, then the prosecutor is probably the Marshall County Attorney's Office (641-754-6314) or the prosecutor for the city where you received the ticket.