A criminal defense lawyer is necessary even if you're just being investigated for a criminal allegation.
An attorney can offer advice regarding your rights while you are in police custody or just during an investigation. An attorney will prevent you from saying or doing things that might hurt your chances in court later on.
Your options are not just plead or go to trial. There is likely to be a multitude of options and avenues available to help you.
An attorney can discuss every possible option with you. Attorneys can analyze your situation from various legal viewpoints and help you determine realistic goals for the outcome of your case.