Is it safe to wire a light junction box to a plug (which could then be plugged into a switch-controlled outlet)?
Generally this is made of "Nope".  

You hope to use flexible cordage. 

Cordage needs to be correct for the task.  A random extension cord won't cut it - believe me, I've struggled a lot to find longer cords I can put on 4' fluorescent fixtures.  (I don't want to splice plugs on them, I want premade plugs). 

Cordage needs to have proper grommeting/strain relief anytime it enters or exits a listed electrical box.  

You can't attach cordage to walls.  You might be able to run it through surface mount conduit.

You definitely can't route cordage through a doorway, whether there's a door or not. 

Other than that, Mrs. Lincoln, use of cordage is not strictly prohibited.  It's fine for the short jumper between a lamp properly physically mounted, and a nearby outlet which has been installed for that purpose.  In fact, look "up" in a CostCo ceiling and you'll see a lot of that.  

Maybe you should ask your landlord to install just that. 

Speaking of that... The lamp needs to be properly hung from the ceiling. "any old way" won't do, it must be hung by a UL listed method.  That is because if the lamp falls down, it will tear out its cordage, which will start a house fire or electrocute someone. 



The home was provisioned to you with switched outlets along the floor.  The purpose for those outlets is to plug in floor lamps.  That is the right way to light the room. 

If you like ceiling light... remember the terrible old halogen torchiere lights which stood 6' tall and had a 500W halogen bulb lighting the ceiling (which started fires)?  Those were brought to market for this very problem. The good news is, today, you should be able to find modern LED versions that are maybe 30-50 watts.  



Unless you investigate house fires for a living, you can't go with your own intuition of "safe".  People who do... have written a big book.  It's called the National Electrical Code.  

The book is the reference standard used by insurance agents, prosecutors and judges. When a tenant violates Code, he creates a very ugly liability situation because the home insurer won't pay the landlord for the fire loss, leaving him to go after you.  After you deal with the criminal justice system, you file bankruptcy to shake off the civil debt, and get a big surprise.

As a landlord I might be mellow about an alteration that was to code.  But if not, I'd call the building inspector in, and he'd condemn the house and you'd be out.   This method overrides rent control, 30 day notices and the like.