Let us say we have around 0 degrees celsius and I have wet feet and I am in the middle of nowhere (let us say 2 days away from any civilisation). On the one hand people say it is no problem to walk in wet shoes on the other hand I have heard about pneumonia. So what should I do in this situation?
Pneumonia is not what you have to be worried about in this situation. It is a serious pathological condition of the lungs commonly (but not exclusively) caused by viral or bacterial infection. Unless you were previously infected it is not likely to catch anything away from civilization. There is a widespread notion of a relation between being cold and catching the common cold (which is not pneumonia), but many studies could not find any relation. If interested google it or start here: http://www.abc.net.au/health/talkinghealth/factbuster/stories/2008/04/02/2205865.htm
On the other hand you are in danger of frostbite on your feet. I guess you do not have the possibility to dry them (otherwise this is the obvious way to go). If you already have frostbite and have any means of calling rescue, do that. If you feet are still fine you can walk towards civilization, walking should keep your feet from getting frostbite at 0 degrees with appropriate shoes. When stopping your wet feet are in high danger of cooling out, so you cannot stop for long. Including other problems like the blisters you will probably develop with wet feet and trench feet, it will probably be inadvisable to try to go on, so again get rescue if you can. In case this is no option you will just have to walk on, there is not much to do. For the night you can obviously remove the shoes and thus should be fine (or at least not worsening).
I am presuming this is not a hypothetical survival situation and it can be planned for.
I used to regularly walked in wet boots for days, often in near (although rarely below) 0 degree temperatures, although pass hopping we could spend most of a day above the snow line with wet boots. A typical week to 10 day trip where I live you will cross a river within minutes of leaving the car park. In many of our forests the river is the track and you will cross it a dozen times every kilometer. Wet feet is a given, in winter, cold wet feet is a given. Its usually frowned on to remove boots to keep feet dry - apart from the risk of an accident, its an exercise that slows you down and is pointless because eventually your mates will leave you behind so they can get to camp before dark.
It won't kill you if you are careful and look after yourself. Frost bite and less severe cold injury must be avoided at all costs- do not carry on if you cannot feel you toes, stop and get you feet warm. Blisters can be a problem, and good socks and foot care is essential, as well as proper fitting boots and correct lacing. First sign of blister you must stop and correct the problem (usually lacing is enough, maybe a dressing). If you feet are starting to feel they are getting worse, stop and remove boots and socks for an hour will make a huge difference, even a half hour of fresh air helps.
Key thing is letting your feet dry out and breath when camped. Most people only are on the move for no more than 8-10 hours a day, leaving 14-16 hours for feet to dry and recover. The reason the solders in WW1 had such a big problem with trench foot was 24 hours of submersion and wet feet. As soon as you stop to make camp, boots and socks must come off and dry socks go on. If multi day, wash socks and hang up to dry if at all possible - clean and wet is better than dirty and damp. I always carried a pair of light sandles, as these allow plenty of air movement. Don't use your dry socks the next day (unless its the last day), you must get your feet dry and warm in the evening.
If you are in survival mode the advise above applies more so. Take every opportunity to look after your feet, they are the only thing that will get you home.
48 hours is very definitively too long for your feet to be wet, even regardless of temperature.
From the CDC article "Injury occurs because wet feet lose heat 25-times faster than dry feet. Therefore, to prevent heat loss, the body constricts blood vessels to shut down circulation in the feet. Skin tissue begins to die because of lack of oxygen and nutrients..."
You should make every effort to avoid finding yourself in the situation you describe, because if you are unable to dry your feet in subzero temperatures your are extremely likely to die.