Render main menu in page.tpl.php, with override from template.php
The function you need to override is theme_links() and to do that just for the main menu you can use mytheme_links__system_main_menu as the function name. To add span tags you can then modify the part that starts with if (isset($link['href'])):

if (isset($link['href'])) {
  // Pass in $link as $options, they share the same keys.
  $link['html'] = TRUE;
  $output .= l('&lt;span&gt;'. check_plain($link['title']) .'&lt;/span&gt;', $link['href'], $link);
}