First, “why” areas with green space have less crime is not definitively known, although there is a strong indication that this is in part due to stress relief. Which is more relaxing to you, sitting on a bench looking out across a park or sitting on a bench looking out across a parking lot?
Second, I would argue that higher density only screams higher crime rate to you because of the reason you attribute to green space: poor people tend to be forced into very cramped living spaces; this certainly happens more often than with the middle or upper classes. Rich people live in New York City, yes? Do the areas in which they live have higher crime rates than areas where the rich live spread out? Unfortunately, very few cities produce SimCity-like reports of crime vs income, so I don't know personally, but I’d expect only a minimal increase in crime rates and those resulting entirely from proximity to areas of high crime, not due to density itself.
Third, regarding the possibility of densely packed cities having green space, I have two words for you: Central Park. If that isn’t enough, then perhaps this word and two letters will be: Washington D.C. But to be more verbose, I’m not advocating for arcologies; rather, it is the suburbs that I believe are a detriment to… well, everything good and decent about human life (okay, I may be over-exaggerating).
And fourth, I fear the day when someone could drive across the United States and see more people than "nothing." We have around 3,794,066 sq miles of land and somewhere around 307,465,000 people. That means each individual could get roughly 1/10th of a square mile to themselves. Living space is often determined by square feet, so to put this in perspective, each person could have a lot of land that is nearly three million sq ft. In contrast, a thousand sq ft home is considered to be small but comfortable.