doing some digging you MIGHT be able to use a Phenom N930 though that is only an educated guess
if you look here
http://www.zdnet.com/blog/computers/dell-chooses-amd-cpus-for-inspiron-m501r-m5030-laptops/3911
it looks like the m501r and m5030 are possibly sister models and the m501r uses the n930
if you research and find out the dell motherboard part number for the m501r and the part number for the m5030 (call dell support-they are good at least at looking up replacement part numbers-act like you want to buy both mobos and see if the part numbers match)
BTW that guy Brian is an Idiot LOL right in service manual they explain replacing the cpu
I dont know if the N930 is better performance wise to justify replacing the p340
dell support only lists service manual and quick setup and they only had the sempron and P340 listed for that model in specs
sorry I couldnt be more help