Can Oracle Named User Licenses be reused?
In general, you can move named user licenses around so long as at any given point in time you can identify the 20 humans (or non-human licensed entities) that have access to the system.  In your case, so long as there is never a point where all 40 users have access to the system, it sounds like you would be OK.

Of course, as with any licensing question, you would really need to talk with Oracle Sales and/or the folks that manage your licenses to get a definitive answer.  Unlike technical suggestions, licensing suggestions can't really be tried out and verified in your environment before implementation.  And if you get audited and it is determined that there is some issue with how you've managed your licenses, explaining that some guy on the internet told you it was OK is a career-limiting maneuver.