The # character should be readable by any barcode decoding device (hardware or software) so you shouldn't need to worry about.
If you wish to remove the prefix 'LOT#' it can be done with the following script attached to the exit event of the respective text field.
// form1.page1.tf1::exit - (JavaScript, client)
var lot = this.rawValue;
this.rawValue = lot.substring(4,lot.length);
Steve