Iranian president seeks to calm tensions, acknowledging protesters' 'legitimate' grievances over inflation.