Can I place a receptacle entirely inside a box and close it up?
That is called a bell box and yes you can add a receptacle to it if not on a GFCI circuit you could use a WR rated GFCI with a extra duty or in use cover and this would be code compliant. And yes it needs to also be tamper resistant. I use these boxes as junction boxes all the time with a blank cover but when adding the receptacle a special cover is required to keep the rain off or out of the receptacle.