Sure, you can use a bottom layer that set opacity to 100% during the firsts 5 of 10 seconds and an upper one that set opacity to 100% during the lasts 5 of 10 seconds
The upper layer opacity expression could be $(#DWE#%10)>5?100:0$
The bottom one could be $(#DWE#%10)<5?100:0$