A federal judge on Wednesday cleared the way for President Donald Trump's plan to downsize the federal workforce with a deferred resignation program.