You can. Do some searches on here for pumpkin, there are many threads. Any squash, or even sweet potatoes or yams, will work similarly.
Most often people peel them, chunk them, and roast them for awhile. Then add them to the mash.
If you're doing all extract, you can add them to the boil (use a bag) and you should get color and flavor.
Spices can be added to the boil or the fermenter. I prefer the boil, but I've personally grown weary of spiced ales. I'm sure I'll come around again in a year or more.