You can use lower quality fuel to burn/smelt anything up until just before it finishes and when it goes out you can put in good quality fuel. Example, you put 11 shitty quality coal in to a smelter and let it burn. It goes out and the ore is sitting at 95% at which point you put in the good quality piece and finish it off and it will take the good quality.
Putting in your good quality fuel before the shit quality finishes will cause the quality to average, wait until it is done first.