Is it possible to forgive crimes made during, or on behalf of, a quest?
I want the player to do everything a bandit does and when his quest is complete Queen Elisif "forgives" him of those specific crimes..
Yes, it's possible (with a few tricks. maybe) I think
Have a read about Crime Factions and Crime Gold ... http://www.creationkit.com/Crime
You could have the player arrested (surrender, like in the Markarth Silverblood Quest Scene) and then use the http://www.creationkit.com/IsArrested_-_Actor function (in an onupdate, or something) to get the guards to take him to the Queen ... Instead of Jail ... where his Crime Faction status and crimegold values are reset (in dialogue-script, with the Queen).
Or ... if the crimes were to be committed in a different hold to the forgiving scene ... The PC would have no crime in that hold and so arrest would not be necessary ... just go visit the Queen (and dialogue with her does the same reset) (oh, and dont get caught in that other hold before you do see her!)